package com.example.controller;

import java.util.List;

public class User {

	int userID;
	String firstName;
	String lastName;
	String email;
	String phone;
	double latitude;
	double longitude;
	String timeStamp;
	iCRUD<User, Integer, Integer> crudObject;
	
	public User(iCRUD<User, Integer, Integer> crudObject){
		this.crudObject = crudObject;
	}
	
	public void create()
	{
		this.crudObject.create(this);
		
	}
	
	public User read(Integer uID){
		return this.crudObject.read(uID);
	}
	
	public List<User> readAll(){
		return this.crudObject.readAll();
	}
	
	public void update(){
		this.crudObject.update(this);
	}
	
	public void delete(){
		this.crudObject.delete(this.userID);
	}
	
	
	//Getters and Setters
	public int getUserID() {
		return userID;
	}
	public void setUserID(int userID) {
		this.userID = userID;
	}
	public String getFirstName() {
		return firstName;
	}
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	public String getLastName() {
		return lastName;
	}
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public double getLatitude() {
		return latitude;
	}
	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}
	public double getLongitude() {
		return longitude;
	}
	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}
	public String getTimeStamp() {
		return timeStamp;
	}
	public void setTimeStamp(String timeStamp) {
		this.timeStamp = timeStamp;
	}
	
	
	
}
